//************************************************************
//    > File Name: single-number.cpp
//    > Author: davis
//    > Mail:  
//    > Created Time: 2017年03月20日 17:08:30
//***********************************************************
//lintcode #82
#include<bits/stdc++.h>
using namespace std;
int singleNumber(vector<int>& A){
	int single = 0;
	for(int i=0;i<A.size();++i){
		single ^= A[i];
	}
	return single;
}
int main(){
	vector<int> a(7);
	a.push_back(1);
	a.push_back(2);
	a.push_back(2);
	a.push_back(1);
	a.push_back(7);
	a.push_back(4);
	a.push_back(7);
	int r=singleNumber(a);
	cout<<"single number is "<<r<<endl;
}
